﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteWithControlAccess.Master"
    Inherits="ProjetoComperio.SystemFramework.Web.ComperioViewPage<ProjetoComperio.DataLayer.Entities.Comment>" %>

<%@ Import Namespace="WebUI.GlobalResources.HtmlHelper" %>
<%@ Import Namespace="DataLayer" %>
<%@ Import Namespace="ProjetoComperio.DataLayer.Entities" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <table>
            <%                
                if (ViewData["Comments"] != null)

                    foreach (var comment in ViewData["Comments"] as IQueryable<Comment>)
                    {  %>
            <tr>
                <td align="left">
                    <fieldset>
                        <legend>
                            <%= comment.UserName + " / " + comment.Email + " / " + comment.CreatedDate %>
                        </legend>
                        <%= comment.Description %>
                    </fieldset>
                </td>
            </tr>
            <% } %>
        </table>
    </div>
    <div>
        <% Html.BeginForm()%>
        <label class="TextBoxLabel2 Textboxlabel" for="UserName">
            Usuário:
        </label>
        <div class="div_texbox">
            <%= Html.TextBox("UserName")%>
        </div>
        <%= Html.ValidationImage("UserName")%>
        <br />
        <br />
        <label class="TextBoxLabel2 Textboxlabel" for="Email">
            Email:
        </label>
        <div class="div_texbox">
            <%= Html.TextBox("Email")%>
        </div>
        <%= Html.ValidationImage("Email")%>
        <br />
        <br />
        <label class="TextBoxLabel2 Textboxlabel" for="UserName">
            Comentário:
        </label>
        <div class="div_texbox">
            <%= Html.TextBox("Description")%>
        </div>
        <%= Html.ValidationImage("Description")%>
        <br />
        <br />
        <%= this.CommandField(true, Request.UrlReferrer.ToString())  %>
        <% Html.EndForm(); %>
        <br />
        <br />
    </div>
</asp:Content>
